package smartcase.endpoints;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import smartcase.base.ApiResponse;
import smartcase.dto.request.ValidParamRequest;

import javax.validation.Valid;

import static smartcase.base.StandardKt.ok;

@RestController
public class ValidatorTestEndpoint {

  @GetMapping("/param/valid")
  public ApiResponse validUrlParam(@Valid ValidParamRequest request) {
    request.setName("1");
    return ok();
  }
}
